package com.study.userserviceprovider.controller;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description： config信息获取
 * @author: 李军容
 * @version: 2020/11/29 21:37
 */
@RefreshScope
@RestController
@RequestMapping("/configController")
public class ConfigController {

   /* @Value("${test}")
    private String test;*/

    @Value("${custom.test.aaa}")
    private String custom;

    /*@Value("${testEnv}")
    private String testEnv;
*/
    @Value("${java.version}")
    private String context;

    @GetMapping("/test")
    public String test(){
        return "";
    }

    @GetMapping("/testEnv")
    public String testEnv(){
        return custom;
    }

}
